﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YYSite.Common;
using YYSite.Common.NHibernate;
using YYSite.Domain.BaseData.SchoolYears;

namespace YYSite.Repository.BaseData.SchoolYears
{
    public class SchoolYearRepository : Repository<SchoolYear>, ISchoolYearRepository
    {
        public SchoolYearRepository(ITransactionManager transactionManager) : base(transactionManager)
        {
        }

        public DataGridOutput<SchoolYear> GetSchoolYearByPage(GetSchoolYearDataGridInput input)
        {
            input.Initialize();
            string sql = "SELECT * FROM  [BaseData].[SchoolYear]"+input.GetSQL();
            return this.Session.QueryPaged<SchoolYear>( sql,input.GetParameters(), input.GetOrderBy(),input);

        }
    }
}


